<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
// 接口首页
$router->get('/', ['uses' => 'DocController@readme']);

$router->get('/log', ['uses' => 'IndexController@index']);

// 生成key值
$router->get('/key', function () use ($router) {
    return str_random(32);
});

// 查看运行日志
$router->get('runtime[/{date}]', ['uses' => 'IndexController@runtime']);
// 查看接口文档
$router->get('doc/{name}', ['uses' => 'DocController@index']);